@import 'https://fonts.googleapis.com/css?family=Roboto:300,400,500';

body {
  margin: 0 auto;
  max-width: 50em;
  /* 'Courier New', Courier, monospace */
  /* font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; */
  /* customize font, import by `@import` */
  font-family: "Roboto", "Helvetica", "Arial", sans-serif;
  line-height: 1.5;
  padding: 4em 1em;
  /* default */
  font-size: 16px;
  /* color: #555; */
  color: #566b78;
}

h2 {
  /* em: 相对于 parent 的 font size */
  margin-top: 1em;
  padding-top: 1em;
}

h1,
h2,
strong {
  color: #333;
}

code,
pre {
  /* background: #eee; */
  background: #f5f7f9;
  border-bottom: 1px solid #d8dee9;
  color: #a7adba;
}
code {
  padding: 2px 4px;
  /* 先对于 parent 下的其他 child文本 来说 */
  vertical-align: text-bottom;
}
pre {
  padding: 1em;
  border-left: 2px solid #69c;
}

a {
  color: #e81c4f;
}

header {
  background-color: #263d36;
  background-image: url("header.jpg");
  background-position: center top;
  background-repeat: no-repeat;
  /* 
  contain: 缩小图片来适应元素的尺寸
  cover: 扩展图片来填满元素
  10px 11px: 调整图片到指定大小
  50% 100%: 调整图片到指定大小，百分比相对于包含元素的尺寸
   */
  background-size: cover;
  line-height: 1.2;
  /* vw: 相对于视口的宽度 */
  padding: 10vw 2em;
  text-align: center;
}
header img {
  display: inline-block;
  height: 120px;
  vertical-align: top;
  width: 120px;
}
header h1 {
  color: white;
  font-size: 2.5em;
  font-weight: 300;
}

header a {
  border: 1px solid #e81c4f;
  border-radius: 290486px;
  color: white;
  font-size: 0.6em;
  letter-spacing: 0.2em;
  padding: 1em 2em;
  text-transform: uppercase;
  text-decoration: none;
  transition: none 200ms ease-out;
  transition-property: color, background;
}

header a:hover {
  background:  #e81c4f;
  color: white;
}

/* ----------------------------------------------- */

.demo1 .use-float .box {
  float: left;
  width: 200px;
  height: 100px;
  margin: 1em;
}
.demo1 .use-float .after-box {
  clear: left;
}

.demo1 .use-inline-block .box2 {
  display: inline-block;
  width: 200px;
  height: 100px;
  margin: 5px;
}

.demo1 .flex-center {
  height: 300px;
  display: -webkit-flex;
  display:         flex;
  -webkit-align-items: center;
          align-items: center;
  -webkit-justify-content: center;
          justify-content: center;
}

.demo2 .one p {
  width: 600px;
  margin: 0 auto;
  color: green;
}

.demo2 .two p {
  max-width: 600px;
  margin: 0 auto;
  color: green;
}

.demo2 .three {
  width: 500px;
  margin: 20px auto;
  color: green;
  border: 1px solid green; /* 这里设置border宽度是为了看出区别, 对比; 请当作没有设置好了 */
}

.demo2 .four {
  width: 500px;
  margin: 20px auto;
  padding: 50px;
  color: green;
  border: 1px solid green;
  border-width: 10px; /* 覆盖border中的2px */
}

.demo2 .five {
  width: 500px;
  margin: 20px auto;
  border: solid green 1px;
  -webkit-box-sizing: border-box;
     -moz-box-sizing: border-box;
          box-sizing: border-box;
}

.demo2 .six {
  width: 500px;
  margin: 20px auto;
  padding: 50px;
  border: solid green 1px;
  border-width: 10px;
  -webkit-box-sizing: border-box;
     -moz-box-sizing: border-box;
          box-sizing: border-box;
}

.static {
  position: static;/* 默认值 */
}

.relative1 {
  border: 1px solid green;
  position: relative;
  width: 700px;
}
.relative2 {
  border: 1px solid green;
  position: relative;
  top: -7px;/* 和顶部距离 相对于正常位置来说 */
  left: 40px;/* 和左边距离 相对于正常位置来说 */
  background-color: white;
  width: 700px;
}

.fixed {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 200px;
  background-color: white;
  border: 1px solid green;
  color: green;
  padding: 5px;
}

.absolute-relative {
  position: relative;
  width: 600px;
  height: 400px;
  border: 1px solid green;
}
.absolute {
  position: absolute;
  top: 120px;
  right: 0;
  width: 200px;
  height: 200px;
  border: 1px solid green;
}

.image2 {
  float: right;
  margin: 0 0 1em 1em;
}

.demo4 .box {
  float: left;
  width: 200px;
  height: 100px;
  margin: 1em;
}

.demo4 .box2 {
  float: left;
  width: 200px;
  height: 100px;
  margin: 1em;
}
.demo4 .after-box {
  clear: left;
}

.demo4 .clear-fix {
  overflow: auto;
  /* zoom: 1; */ /* 支持ie6 */
}

.demo5 .clear-fix {
  overflow: auto;
  max-width: 500px;
}
.demo5 img {
  float: right;
  width: 50%;/* father元素的50% */
}

.demo5 .container nav {
  float: left;
  width: 25%;
}
.demo5 .container section {
  margin-left: 25%
}
.demo5 .container {
  overflow: auto;/* 解决溢出问题 */
  max-width: 900px;
}

@media screen and (min-width: 600px) {
  .demo6 .container nav {
    float: left;
    width: 25%;
  }
  .demo6 .container section {
    margin-left: 25%
  }
  .demo6 .container {
    overflow: auto;/* 解决溢出问题 */
  }
}
@media screen and (max-width:599px) {
  nav li {
    display: inline;
  }
}

.demo7 .three-column {
  padding: 1em;
  -moz-column-count: 3;
  -moz-column-gap: 1em;
  -webkit-column-count: 3;
  -webkit-column-gap: 1em;
  column-count: 3;
  column-gap: 1em;

  max-width: 700px;
}
